<?php
declare (strict_types = 1);

namespace app\model\table\user;

use app\model\BaseModel;
use app\model\table\union\Union;
use think\Model;

/**
 * @mixin \think\Model
 */
class User extends BaseModel
{
    protected $table = 'app_user';

    // 是否全表缓存到redis
    public $tableToRedis = true;

    // 该表缓存到redis的策略
    public $tableToRedisKey = ['token'];

    public $joinWithList=array(
        'UnionInfo'=>array(
            'selfColumn'=>'union_id',
            'joinObj'=> Union::class,
            'joinColumn'=>'id',
            'selectColumn'=>'id,name,icon'
        ),
    );
}
